<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Http
 *
 * @author miho
 */
class BluesCoders_Request_Http {

    protected $_parameters;
    protected $_attributes;
    protected $_uri;

    public function  __construct() {
        $this->_parameters = $_POST;
        unset($_POST);
        
        $this->_uri = $_SERVER['REQUEST_URI'];
        $this->_attributes = array();
    }

    public function getParameter($key, $default = null) {
        return isset($this->_parameters[$key]) ? $this->_parameters[$key] : $default;
    }

    public function getAttribute($key, $default = null) {
        return isset($this->_attributes[$key]) ? $this->_attributes[$key] : $default;
    }

    public function setAttribute($key, $value) {
        $this->_attributes[$key] = $value;
    }

    public function getUri() {
        return $this->_uri;
    }

}
?>
